home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
misc
/
vhlogger_v2.lzh
/
qslcard.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-07-14
|
4KB
|
174 lines
/* $VER: qslcard.rexx 1.00 (060792) */
/* Version 1 - 07/05/92 Vince Herried ka8cte */
/* purpose print a qsl card from the vhlog data base. */
/* arguments a list of blank seperated call signs */
/* if no arguments are given, the program will resort to
prompting the user for the arguments */
arg parm
options results
test='y' /* if y, turn on trace after mundane stuff is done */
open='n'
if (parm = '') then
batch = 'n'
else batch = 'y'
/* the following describe the numeric to character values for the
band, mode, power, and antenna values feel free to modify the text
in these field (possibly preserving the original value as a comment)
to suit your own needs.
*/
band.0=" "
band.1="160M"
band.2= "80M"
band.3= "40M"
band.4= "30M"
band.5= "20M"
band.6= "17M"
band.7= "15M"
band.8= "12M"
band.9= "10M"
band.10= "6M"
band.11= "2M"
band.12= "1.25M"
band.13= "70CM"
band.14= "33CM"
band.15= "23CM"
band.16= "other"
mode.0= " "
mode.1= "CW"
mode.2= "SSB"
mode.3= "FM"
mode.4= "AM"
mode.5= "AMTOR"
mode.6= "RTTY"
mode.7= "PACKET"
mode.8= "ASCII"
mode.9= "FAX"
mode.10= "SSTV"
mode.11= "FSTV"
mode.12= "other"
power.0= " "
power.1= "1W"
power.2= "5W"
power.3= "50W"
power.4= "200W"
power.5= "1KW"
power.6= "2KW"
antenna.0= " "
antenna.1= "RANDOM"
antenna.2= "DIPOLE1"
antenna.3= "DIPOLE2"
antenna.4= "DIPOLE3"
antenna.5= "DIPOLE4"
antenna.6= "VERT 1"
antenna.7= "VERT 2"
antenna.8= "VERT 3"
antenna.9= "VERT 4"
antenna.10= "BEAM 1"
antenna.11= "BEAM 2"
antenna.12= "BEAM 3"
antenna.13= "BEAM 4"
antenna.14= "DUCK"
antenna.15= "QUAD"
antenna.16= "DISH"
antenna.17= "HELIX"
antenna.18= "other"
if test = 'y' then trace('r')
if open = 'n' & test ='n' then do /* data base program not running yet */
address "COMMAND"
"run vhlogger"
WaitForPort "vhlogger"
address "vhlogger"
"back" /* window to back */
"open vhlog" /* open the input file. */
open = 'y'
end /* if open = 'n' */
address "vhlogger"
do while(getcall())
"find" callsign
if rc ~= 0 then do
say callsign "Not found in data base, skipping"
iterate
end /* if rc ~= 0 */
call gen_card result
end /* do while */
if open = 'y' & test = 'n' then do
"close"
"quit"
say "All done now, bye"
open='n'
end /* if open = 'y' */
exit(0)
getcall:
if batch='y' then parse var parm callsign parm
else do
say "Enter call sign or press <enter>"
pull callsign
end
if callsign ~= "" then return(1)
else return(0)
gen_card:
arg result
if printer_open ~= 'y' then do
if (open('printer','PRT:','W') = 0) then do
say "Open of printer failed, ending"
exit(16)
end
printer_open = 'y'
end
parse var result callsign ';' name ';' date ';' stime ';' etime ';' rsts ';',
rstr ';' address ';' city ';' state ';' zip ';' comment ';' srh ';',
xband ';' xpower ';' xantenna ';' xmode junk
xmode=strip(xmode,'T','.') /* yank period */
page = '0c'x /* form feed */
if test ~= 'y' then x = writeln("printer",page)
x= writeln("printer","Radio" callsign "confirming our QSO")
line="on" substr(date,3,2)'/'substr(date,5,2)'/'substr(date,1,2),
'at' substr(stime,1,2)':'substr(stime,3,2)'Z'
x = writeln("printer",line)
line = "Your " band.xband "band" mode.xmode "signal was" rsts
x = writeln("printer",line)
line = "My rig is a Kenwood TS830S running" power.xpower
x = writeln("printer",line)
if xantenna ~= 0 then
line = line "into my" antenna.xantenna "antenna";
x = writeln("printer",line)
if substr(srh,2,1) = 'Y' then /* QSL received */
line = "Thanks for your QSL card"
else
line = "Please QSL"
line = line "73 Vince "
x = writeln("printer",line)
/* all done, pump out a new page */
if test ~= 'y' then x=writeln("printer",page)
return(0)